package com.codeforces;

import java.util.Scanner;

public class _112A {

	static String a, b;
	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		a = scanner.next().toLowerCase();
		b = scanner.next().toLowerCase();
		int val = a.compareTo(b);
		if (val != 0) {
			val /= Math.abs(val);
		}
		System.out.println(val);
	}

}
